package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;
import retrofit2.Call;

/**
 * Created by Administrator on 2016/12/29.
 */
public class InviteAnswerAction extends AHttpService<PbBean.PbResQuestionInviteAnswer> {



    public static InviteAnswerAction newInstance(Context context,int questionId , String userId){
        return new InviteAnswerAction(context, questionId , userId);
    }
    private int questionId;
    private String userId;
    public InviteAnswerAction(Context context, int questionId , String userId) {
        super(context);
        this.questionId = questionId;
        this.userId = userId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqQuestionInviteAnswer.Builder builder = PbBean.PbReqQuestionInviteAnswer.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setUserId(userId);
        builder.setQuestionId(questionId);
        return apiService.quizInviteAnswer(builder.build());
    }
}
